feat(l1): add noopTracer for debug_traceTransaction and debug_traceBlockByNumber#6657
feat(l1): add noopTracer for debug_traceTransaction and debug_traceBlockByNumber#6657ElFantasma wants to merge 8 commits into
Conversation
|
🤖 Kimi Code ReviewThe PR implements Minor observations:
Security/Performance:
Verdict: LGTM. The implementation correctly follows the established patterns for tracer integration and properly handles the async timeout requirements. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
Lines of code reportTotal lines added: Detailed view |
🤖 Claude Code ReviewNow I have all the context needed for a thorough review. Let me compile the findings. Review: feat(l1): add noopTracer for debug_traceTransaction and debug_traceBlockByNumberOverall AssessmentThe implementation is correct and closely mirrors the patterns established by CorrectnessState accumulation in Serde mapping — correct. Empty return value — correct. Error propagation — correct. Issues1. Missing explanatory comment on The analogous methods have comments that explain the
2. Asymmetric return type in The two existing block tracers return
3. let tx_hash = block.as_ref().body.transactions[index].hash();
Style / Minor
SummaryNo bugs, no security issues, no consensus risk. Two actionable suggestions: add the Automated review by Claude (Anthropic) · sonnet · custom prompt |
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — the noopTracer is a thin, read-only addition that runs transactions through the existing EVM harness without any state commits to storage or new data structures. The four changed files each follow the established pattern for existing tracers character for character. State management, timeout wrapping, Arc/Mutex usage, serde deserialization, and JSON output format are all consistent with the callTracer and prestateTracer implementations that are already in production. No edge cases in the new code paths deviate from the existing tracers. No files require special attention.
|
| Filename | Overview |
|---|---|
| crates/vm/backends/levm/tracing.rs | Adds LEVM::trace_tx_noop — runs the transaction with LevmCallTracer::disabled() and discards the result; mirrors trace_tx_prestate exactly but without the pre-snapshot capture and post-state build, which is correct for a noop tracer. |
| crates/vm/tracing.rs | Thin Evm::trace_tx_noop facade that delegates to LEVM::trace_tx_noop, consistent with the existing trace_tx_calls / trace_tx_prestate pattern. |
| crates/blockchain/tracing.rs | Adds trace_transaction_noop and trace_block_noop following the exact same Arc/Mutex/timeout pattern as the existing call and prestate tracers; state correctly accumulates across transactions in the block variant. |
| crates/networking/rpc/tracing.rs | Adds TracerType::NoopTracer variant (deserializes correctly from noopTracer via rename_all = camelCase) and wires it through both RPC handlers; response format ({} / [{txHash, result:{}}]) matches Geth's noopTracer output. |
Reviews (1): Last reviewed commit: "feat(l1): add noopTracer for debug_trace..." | Re-trigger Greptile
🤖 Codex Code ReviewNo blocking findings. Residual risk:
The implementation itself is aligned with the existing call/prestate tracing flow; I didn’t spot an obvious EVM/gas-accounting, consensus, or security regression in the noop path from source inspection. I couldn’t run Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
|
Follow-up commit
Skipped intentionally:
Also: kept |
Motivation
The
noopTraceris a standard Geth debug tracer that runs a transaction through the trace harness without recording any per-step data. It is mostly used for benchmarking trace-pipeline overhead and as a smoke test for the tracer dispatch machinery, and several downstream tools expect it to be available.Description
Adds
noopTraceras a thirdTracerTypealongsidecallTracerandprestateTracer, wired throughdebug_traceTransactionanddebug_traceBlockByNumber:LEVM::trace_tx_noopincrates/vm/backends/levm/tracing.rs— executes the tx withLevmCallTracer::disabled()(same disabled tracer already used bytrace_tx_prestate) and discards the result.Evm::trace_tx_noopincrates/vm/tracing.rs— thin façade.Blockchain::trace_transaction_noop/Blockchain::trace_block_noopincrates/blockchain/tracing.rs— rebuild parent state, replay earlier txs, run target tx(s) under the noop tracer with the usual timeout wrapping.TracerType::NoopTracervariant incrates/networking/rpc/tracing.rsplus arms in both handlers. Single-tx returns{}; block returns[{ txHash, result: {} }, …]using the existingBlockTraceComponentwrapper.No new types, no new files, no storage changes.
Closes #6645
How to Test
Checklist